package com.ouc.eddyAlgorithm.service;

import com.ouc.eddyAlgorithm.domain.VgEddy;
import com.ouc.eddyAlgorithm.entity.VGGridData;
import com.ouc.visualization.entity.ContourData;
import ucar.ma2.InvalidRangeException;
import ucar.nc2.NetcdfFile;

import java.io.IOException;
import java.util.List;

public interface VGService {

  /**
   * 获取OW法 W 等值线数据
   *
   * @param fileName 文件名
   * @return
   */
  ContourData<VGGridData> getVGContourData(String fileName, int a, int b, int level, boolean[] constraints, Float[] lon, Float[] lat) throws IOException, InvalidRangeException;

  float[][] getSurfaceData(String fileName, String variableName, Integer level) throws IOException, InvalidRangeException;

  /**
   * 获取一层的vg涡旋点相关信息
   *
   * @param ncFile      nc文件
   * @param a           限制条件
   * @param b           限制条件
   * @param constraints 限制条件
   * @param lonLimit    经度限制
   * @param latLimit    纬度限制
   * @param level       层级
   * @param eddyStartId 涡旋开始id
   * @return
   */
  List<VgEddy> getVgEddyMatrixOfSlice(NetcdfFile ncFile, Integer a, Integer b, boolean[] constraints, Float[] lonLimit, Float[] latLimit, Integer level, Integer eddyStartId) throws IOException, InvalidRangeException;
}
